package com.zongxingh.falcon.mq.constant;

/**
 * Introduction:  消息优先级，level值越大优先级越高
 * Package Name:  com.zongxingh.falcon.mq.constant
 * Project Name:  mq
 * Author:  zongxingh
 * Email： zongxingh@163.com
 * Tel: 157*****778
 * Create Time:  2020/9/22 9:17
 */
public enum MessageLevel {

    /**
     * trace 级别
     */
    LEVEL_TRACE("trace", 0),
    /**
     * debug 级别
     */
    LEVEL_DEBUG("debug", 1),
    /**
     * info 级别
     */
    LEVEL_INFO("info", 2),
    /**
     * warn 级别
     */
    LEVEL_WARN("warn", 3),
    /**
     * error 级别
     */
    LEVEL_ERROR("error", 4);


    private final String code;
    private final int level;

    public String getCode() {
        return code;
    }

    public int getLevel() {
        return level;
    }

    private MessageLevel(String code, int level) {
        this.code = code;
        this.level = level;
    }
}
